package com.example.nettywebsocketdemo.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Author: ZhaoJie
 * @Date: 2022/3/29
 * @Description :
 * @Modify :
 * ===================================================
 * Modifier        Modifytime        Description
 * ===================================================
 */
public class CarImlInvacationHanndler implements InvocationHandler {

    private final CarInterface carInterface;

    public CarImlInvacationHanndler(CarInterface carInterface) {
        this.carInterface = carInterface;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("=======方法执行前========");
//        Object invoke = method.invoke(carInterface, args);
        System.out.println("=======方法执行后========");
        return null;
    }
}
